﻿ <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="AddSupply.aspx.cs" Inherits="dzs.Web.supply.AddSupply" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/JsTools.js" type="text/javascript"></script>
     <script type="text/javascript">
         function checksel() {
             if ($("#<%= GridView1.ClientID %> tr :checkbox:checked").length > 0)
                 return true;
             else
             { alert('没有选择任何行！'); return false; }

         }
    </script>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
            <td style=" height:15px;">
                <b>新建物资供应计划导入</b></td>
        </tr>
        <tr>
            <td style=" height:15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style=" height:15px;">
                &nbsp;&nbsp;<asp:DropDownList 
                    ID="ddl_projectType" runat="server" Visible="False">
                </asp:DropDownList>
                &nbsp; <asp:DropDownList ID="ddl_type" runat="server" Visible="False">
                    <asp:ListItem>正常</asp:ListItem>
                    <asp:ListItem>调配物资</asp:ListItem>
                </asp:DropDownList>
&nbsp;&nbsp;<asp:HyperLink ID="HyperLink1" runat="server" ForeColor="Blue" 
                    NavigateUrl="~/template/supplyplanT.xls">供应计划导入模板下载</asp:HyperLink>
&nbsp;<input id="FileExcel" runat="server" name="FilePhoto" size="42" 
                    style="WIDTH: 300px" type="file" />&nbsp;
                <asp:Button ID="btn_importData" runat="server" Text="导入" 
                    onclick="btn_importData_Click" CssClass="btn" />
            </td>
        </tr>
        <tr>
            <td style=" height:15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style=" height:15px; text-align: left;">
                项目类型：<asp:DropDownList 
                    ID="ddl_projectTypeSel" runat="server">
                </asp:DropDownList>
                &nbsp;导入日期：<asp:TextBox ID="txt_importDateStart" runat="server" 
                    onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"></asp:TextBox>
                至<asp:TextBox ID="txt_importDateEnd" runat="server" 
                    onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"></asp:TextBox>
            &nbsp;
            </td>
        </tr>
        <tr>
            <td style=" height:15px; text-align: left;">
                项目名称：<asp:TextBox ID="txt_projectName" runat="server"></asp:TextBox>
                供应商：<asp:TextBox ID="txt_supplier" runat="server"></asp:TextBox>
                <asp:Button ID="btn_select" runat="server" Text="查询" 
                    onclick="btn_select_Click" CssClass="btn" />
            </td>
        </tr>
        <tr>
            <td style=" height:15px; text-align: left;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style=" height:15px; text-align: left;">
                <asp:Label ID="lbl_count" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style=" height:15px;">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    BorderWidth="0px" CellPadding="0" CellSpacing="1" CssClass="gv" GridLines="None"
                    Width="1500px" AllowPaging="True" 
                    onpageindexchanging="GridView1_PageIndexChanging" 
                    onrowcommand="GridView1_RowCommand" 
                    onrowdatabound="GridView1_RowDataBound" PageSize="30">
                    <Columns>
                        <asp:TemplateField HeaderText="选择">
                         <HeaderTemplate>
                          <input id="cbo_checkAll" type="checkbox" onclick="checkall(this)" />全选
                    </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="cbo_check" runat="server" />
                                <asp:Label ID="lbl_supplyPlanId" runat="server" Text='<%# Bind("supplyPlanId") %>' Visible="False"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbn_del" runat="server" 
                                    CommandArgument='<%# Bind("supplyPlanId") %>' CommandName="lbn_del" 
                                    ForeColor="Blue">删除</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="采购订单号">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("purchaseid") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("purchaseid") %>'></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="projectName" HeaderText="项目名称" />
                        <asp:BoundField DataField="material" HeaderText="物料描述" />
                        <asp:BoundField DataField="num" HeaderText="计划数量" />
                        <asp:BoundField DataField="innums" HeaderText="已入库数量" />
                        <asp:BoundField DataField="unit" HeaderText="单位" />
                        <asp:BoundField DataField="sname" HeaderText="供应商" />
                        <asp:BoundField DataField="slink" HeaderText="联系人" />
                        <asp:BoundField DataField="sourceProjectName" HeaderText="源项目名称" 
                            Visible="False" />
                        <asp:BoundField DataField="sourceProid" HeaderText="源项目编号" Visible="False" />
                        <asp:BoundField DataField="supplyPlanType" HeaderText="计划类型" Visible="False" />
                        <asp:TemplateField HeaderText="供应管理员">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("user_name") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lbl_gygly" runat="server" Text='<%# Bind("user_name") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                     <PagerStyle CssClass="mypager" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style=" height:15px;">
                供应管理员：<asp:DropDownList ID="ddl_gygly" runat="server">
                </asp:DropDownList>
&nbsp;<asp:Button ID="btn_sendGly" runat="server" onclick="btn_sendGly_Click" Text="分配" 
                    CssClass="btn" />
            </td>
        </tr>
        <tr>
            <td style=" height:15px;">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
